package acm.pta9;

import java.util.Scanner;

public class 幸运彩票 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        while (n-- > 0) {
            if (isOk(sc.nextLine().toCharArray())){
                System.out.println("You are lucky!");
            }else {
                System.out.println("Wish you good luck.");
            }
        }
    }
    public static boolean isOk(char[] chars){
        int pre=0;
        for (int i = 0; i < 3; i++) {
            pre+=chars[i]-48;
        }
        int after=0;
        for (int i = 3; i < chars.length; i++) {
            after+=chars[i]-48;
        }
        return after==pre;
    }
}
